package com.bjsxt.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMenuMapper {

    //添加角色和菜单之间的关系
    @Insert("insert into t_role_menu values(#{param1},#{param2})")
    Integer   insert(Integer rid,Integer mid);

    //查询指定角色下菜单
    @Select("SELECT  rm.mid   FROM   t_role_menu  rm  JOIN  t_menu   m  ON  rm.mid=m.mid   WHERE rm.rid=#{param1}  AND  STATUS=1")
    List<Integer>  selectMore(Integer rid);

    //删除指定角色菜单
    @Delete("delete  from   t_role_menu where rid=#{param1}")
    Integer  delete(Integer rid);

}
